package com.ttwl.www.app.meFrame.personInfoFrame;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.ttwl.www.app.R;

/**
 * Created by Administrator on 2017/10/26 0026.
 */

public class LinearAdapterNews extends RecyclerView.Adapter<LinearAdapterNews.LinearViewHolder> {
    private Context mContext;

    public LinearAdapterNews(Context context) {
        this.mContext = context;
    }

    @Override
    public LinearAdapterNews.LinearViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        return new LinearViewHolder(LayoutInflater.from(mContext).inflate(R.layout.fg_personhome_news_item,parent,false)); //传入item
    }

    @Override
    public void onBindViewHolder(LinearAdapterNews.LinearViewHolder holder, int position) {
//        holder.tvTitle.setText("我是标题");
    }

    @Override
    public int getItemCount() {
        return 6;
    }

    class LinearViewHolder extends RecyclerView.ViewHolder {
        private TextView tvTitle;
        public LinearViewHolder(View itemView) {
            super(itemView);
            tvTitle = (TextView) itemView.findViewById(R.id.tv_title);
        }
    }

}
